home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_lrm / chapd.doc < prev    next >
Text File  |  1996-01-30  |  21KB  |  860 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6. The following document is a draft  of  the  corresponding  chapter  of  the
  7. version  of  the  Ada  Reference  Manual  produced  in response to the Ansi
  8. Canvass.  It is given a limited circulation  to  Ada  implementers  and  to
  9. other groups contributing comments (according to the conventions defined in
  10. RRM.comments).  This draft should not be referred to in any publication.
  11.  
  12.  
  13.  
  14.                        ANSI-RM-D-v23 - Draft Chapter
  15.  
  16.                                 D Glossary
  17.                                 version 23
  18.  
  19.  
  20.                                  83-03-11
  21.  
  22.            This revision has considered all comments up to #5795
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.                                 D. Glossary
  78.  
  79.  
  80.  
  81. This  appendix is informative and is not part of the standard definition of
  82. the  Ada  programming  language.   Italicized  terms  in  the   abbreviated
  83. descriptions below either have glossary entries themselves or are described
  84. in entries for related terms.
  85.  
  86. Accept statement.  See entry.
  87.  
  88. Access  type.  A value of an access type (an access value) is either a null
  89. value, or a value that designates an object created by an  allocator.   The
  90. designated  object  can  be  read  and  updated  via the access value.  The
  91. definition of an access type specifies the type of the  objects  designated
  92. by values of the access type.  See also collection.
  93.  
  94. Actual parameter.  See parameter.
  95.  
  96. Aggregate.   The  evaluation  of an aggregate yields a value of a composite
  97. type.  The  value  is  specified  by  giving  the  value  of  each  of  the
  98. components.  Either positional association or named association may be used
  99. to indicate which value is associated with which component.
  100.  
  101. Allocator.   The evaluation of an allocator creates an object and returns a
  102. new access value which designates the object.
  103.  
  104. Array type.  A value of an array type consists of components which are  all
  105. of  the  same  subtype  (and  hence,  of the same type).  Each component is
  106. uniquely distinguished by an index (for a one-dimensional array)  or  by  a
  107. sequence  of  indices (for a multidimensional array).  Each index must be a
  108. value of a discrete type and must lie in the correct index range.
  109.  
  110. Assignment.  Assignment is the operation that replaces the current value of
  111. a variable by a new value.  An assignment statement specifies a variable on
  112. the left, and on the right, an expression whose value  is  to  be  the  new
  113. value of the variable.
  114.  
  115. Attribute.    The   evaluation   of   an   attribute  yields  a  predefined
  116. characteristic of a named entity;  some attributes are functions.
  117.  
  118. Block statement.  A block statement is a single statement that may  contain
  119. a  sequence  of  statements.   It  may also include a declarative part, and
  120. exception handlers;  their effects are local to the block statement.
  121.  
  122. Body.  A body defines the execution of a subprogram, package, or  task.   A
  123. body  stub  is a form of body that indicates that this execution is defined
  124. in a separately compiled subunit.
  125.  
  126.  
  127.  
  128.  
  129.                                    D - 1
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138. Collection.   A  collection  is  the  entire  set  of  objects  created  by
  139. evaluation of allocators for an access type.
  140.  
  141. Compilation  unit.   A compilation unit is the declaration or the body of a
  142. program unit, presented for compilation as  an  independent  text.   It  is
  143. optionally  preceded  by  a  context clause, naming other compilation units
  144. upon which it depends by means of one more with clauses.
  145.  
  146. Component.  A component is a value that is a part of a larger value, or  an
  147. object that is part of a larger object.
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                    D - 2
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204. Composite  type.   A  composite  type  is one whose values have components.
  205. There are two kinds of composite type:  array types and record types.
  206.  
  207. Constant.  See object.
  208.  
  209. Constraint.  A constraint determines a subset of the values of a  type.   A
  210. value in that subset satisfies the constraint.
  211.  
  212. Context clause.  See compilation unit.
  213.  
  214. Declaration.   A  declaration  associates  an  identifier  (or  some  other
  215. notation) with an entity.  This association is in effect within a region of
  216. text  called  the  scope  of  the  declaration.   Within  the  scope  of  a
  217. declaration, there are places where it is possible to use the identifier to
  218. refer  to the associated declared entity.  At such places the identifier is
  219. said to be a simple name of the entity;  the name is  said  to  denote  the
  220. associated entity.
  221.  
  222. Declarative  Part.   A  declarative part is a sequence of declarations.  It
  223. may  also  contain  related  information  such  as  subprogram  bodies  and
  224. representation clauses.
  225.  
  226. Denote.  See declaration.
  227.  
  228. Derived  Type.   A  derived  type is a type whose operations and values are
  229. replicas of those of an existing type.  The existing  type  is  called  the
  230. parent type of the derived type.
  231.  
  232. Designate.  See access type, task.
  233.  
  234. Direct visibility.  See visibility.
  235.  
  236. Discrete  Type.   A  discrete  type  is  a type which has an ordered set of
  237. distinct values.  The discrete types are the enumeration and integer types.
  238. Discrete types are used for indexing and iteration, and for choices in case
  239. statements and record variants.
  240.  
  241. Discriminant.  A discriminant is a distinguished component of an object  or
  242. value  of  a  record type.  The subtypes of other components, or even their
  243. presence or absence, may depend on the value of the discriminant.
  244.  
  245. Discriminant constraint.  A discriminant constraint on  a  record  type  or
  246. private type specifies a value for each discriminant of the type.
  247.  
  248. Elaboration.   The elaboration of a declaration is the process by which the
  249. declaration achieves its effect (such as creating an object);  this process
  250. occurs during program execution.
  251.  
  252. Entry.  An entry is used for communication between tasks.  Externally,   an
  253. entry  is  called just as a subprogram is called;  its internal behavior is
  254. specified by one or more accept statements specifying  the  actions  to  be
  255. performed when the entry is called.
  256.  
  257. Enumeration type.  An enumeration type is a discrete  type whose values are
  258. represented  by enumeration literals which are given explicitly in the type
  259.  
  260.  
  261.                                    D - 3
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270. declaration.   These  enumeration  literals  are  either   identifiers   or
  271. character literals.
  272.  
  273. Evaluation.   The  evaluation  of an expression is the process by which the
  274. value of the expression is computed.  This process  occurs  during  program
  275. execution.
  276.  
  277. Exception.   An  exception  is  an  error  situation which may arise during
  278. program execution.  To raise an exception  is  to  abandon  normal  program
  279. execution  so  as  to  signal that the error has taken place.  An exception
  280. handler is  a  portion  of  program  text  specifying  a  response  to  the
  281. exception.   Execution  of  such  a  program  text  is  called handling the
  282. exception.
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                    D - 4
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336. Expanded name.  An expanded  name  denotes  an  entity  which  is  declared
  337. immediately  within  some  construct.   An  expanded name has the form of a
  338. selected component:  the prefix denotes the construct (a program unit;   or
  339. a  block,  loop,  or accept statement);  the selector is the simple name of
  340. the entity.
  341.  
  342. Expression.  An expression defines the computation of a value.
  343.  
  344. Fixed point type.  See real type.
  345.  
  346. Floating point type.  See real type.
  347.  
  348. Formal parameter.  See parameter.
  349.  
  350. Function.  See subprogram.
  351.  
  352. Generic unit.  A generic unit is a template either for a set of subprograms
  353. or for a set of packages.   A  subprogram  or  package  created  using  the
  354. template   is   called   an  instance  of  the  generic  unit.   A  generic
  355. instantiation is the kind of  declaration  that  creates  an  instance.   A
  356. generic   unit  is  written  as  a  subprogram  or  package  but  with  the
  357. specification prefixed by a generic formal part which may  declare  generic
  358. formal  parameters.   A  generic  formal  parameter  is  either  a  type, a
  359. subprogram, or an object.  A generic unit is one of the  kinds  of  program
  360. unit.
  361.  
  362. Handler.  See exception.
  363.  
  364. Index.  See array type.
  365.  
  366. Index  constraint.   An  index  constraint  for an array type specifies the
  367. lower and upper bounds for each index range of the array type.
  368.  
  369. Indexed component.  An indexed component denotes a component in  an  array.
  370. It is a form of name containing expressions which specify the values of the
  371. indices  of  the  array component.  An indexed component may also denote an
  372. entry in a family of entries.
  373.  
  374. Instance.  See generic unit.
  375.  
  376. Integer type.  An integer type is a discrete type  whose  values  represent
  377. all integer numbers within a specific range.
  378.  
  379. Lexical  element.   A  lexical  element  is  an  identifier,  a  literal, a
  380. delimiter, or a comment.
  381.  
  382. Limited type.  A limited type is a type for which  neither  assignment  nor
  383. the  predefined  comparison  for equality is implicitly declared.  All task
  384. types are limited.  A private type  can  be  defined  to  be  limited.   An
  385. equality operator can be explicitly declared for a limited type.
  386.  
  387. Literal.     A  literal  represents a value literally, that is, by means of
  388. letters and other characters.  A literal is either a  numeric  literal,  an
  389. enumeration literal, a character literal, or a string literal.
  390.  
  391.  
  392.  
  393.                                    D - 5
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402. Mode.  See parameter.
  403.  
  404. Model  number.   A model number is an exactly representable value of a real
  405. type.  Operations of a real type are defined in terms of operations on  the
  406. model  numbers  of  the  type.   The properties of the model numbers and of
  407. their  operations   are   the   minimal   properties   preserved   by   all
  408. implementations of the real type.
  409.  
  410. Name.   A  name  is a construct that stands for an entity:  it is said that
  411. the name denotes the entity, and that the entity  is  the  meaning  of  the
  412. name.  See also declaration, prefix.
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.                                    D - 6
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468. Named  association.   A  named  association specifies the association of an
  469. item with one or more positions in a list, by naming the positions.
  470.  
  471. Object.  An object contains a value.  A program creates an object either by
  472. elaborating an object declaration  or  by  evaluating  an  allocator.   The
  473. declaration  or  allocator specifies a type for the object:  the object can
  474. only contain values of that type.
  475.  
  476. Operation.  An operation is an elementary action  associated  with  one  or
  477. more  types.   It  is  either implicitly declared by the declaration of the
  478. type, or it is a subprogram that has a parameter or result of the type.
  479.  
  480. Operator.  An operator is an operation which has one or  two  operands.   A
  481. unary  operator is written before an operand;  a binary operator is written
  482. between two operands.  This notation is a special kind  of  function  call.
  483. An  operator  can be declared as a function.  Many operators are implicitly
  484. declared by the declaration of a type (for example, most type  declarations
  485. imply the declaration of the equality operator for values of the type).
  486.  
  487. Overloading.   An  identifier  can  have  several alternative meanings at a
  488. given point in the program text:  this property is called overloading.  For
  489. example, an overloaded  enumeration  literal  can  be  an  identifier  that
  490. appears in the definitions of two or more enumeration types.  The effective
  491. meaning   of  an  overloaded  identifier  is  determined  by  the  context.
  492. Subprograms, aggregates,  allocators,  and  string  literals  can  also  be
  493. overloaded.
  494.  
  495. Package.   A  package specifies a group of logically related entities, such
  496. as types, objects of those types, and subprograms with parameters of  those
  497. types.   It  is  written  as a package declaration and a package body.  The
  498. package declaration has a visible part, containing the declarations of  all
  499. entities that can be explicitly used outside the package.  It may also have
  500. a   private   part   containing   structural   details  that  complete  the
  501. specification of the visible entities, but which are irrelevant to the user
  502. of the package.  The package body contains implementations  of  subprograms
  503. (and  possibly  tasks  as  other  packages) that have been specified in the
  504. package declaration.  A package is one of the kinds of program unit.
  505.  
  506. Parameter.  A parameter is one of the  named  entities  associated  with  a
  507. subprogram,  entry,  or  generic  unit,  and  used  to communicate with the
  508. corresponding subprogram body, accept statement or generic body.  A  formal
  509. parameter is an identifier used to denote the named entity within the body.
  510. An   actual   parameter  is  the  particular  entity  associated  with  the
  511. corresponding formal parameter by a subprogram call, entry call, or generic
  512. instantiation.  The mode  of  a  formal  parameter  specifies  whether  the
  513. associated  actual  parameter supplies a value for the formal parameter, or
  514. the formal supplies a  value  for  the  actual  parameter,  or  both.   The
  515. association of actual parameters with formal parameters can be specified by
  516. named  associations,  by  positional  associations,  or by a combination of
  517. these.
  518.  
  519. Parent type.  See derived type.
  520.  
  521. Positional association.  A positional association specifies the association
  522. of an item with a position in a list, by using the  same  position  in  the
  523.  
  524.  
  525.                                    D - 7
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534. text to specify the item.
  535.  
  536. Pragma.  A pragma conveys information to the compiler.
  537.  
  538. Prefix.   A  prefix  is used as the first part of certain kinds of name.  A
  539. prefix is either a function call or a name.
  540.  
  541. Private part.  See package.
  542.  
  543. Private type.  A private type is a type whose structure and set  of  values
  544. are clearly defined, but not directly available to the user of the type.  A
  545. private  type is known only by its discriminants (if any) and by the set of
  546. operations defined for it.  A private type and  its  applicable  operations
  547. are  defined in the visible part of a package, or in a generic formal part.
  548. Assignment, equality, and inequality are also defined  for  private  types,
  549. unless the private type is limited.
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.                                    D - 8
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600. Procedure.  See subprogram.
  601.  
  602. Program.   A  program  is composed of a number of compilation units, one of
  603. which is a subprogram called the main program.  Execution  of  the  program
  604. consists  of  execution  of  the main program, which may invoke subprograms
  605. declared in the other compilation units of the program.
  606.  
  607. Program unit.  A program unit is  any  one  of  a  generic  unit,  package,
  608. subprogram, or task unit.
  609.  
  610. Qualified  expression.  A qualified expression is an expression preceded by
  611. an indication of its type or subtype.  Such qualification is used when,  in
  612. its   absence,  the  expression  might  be  ambiguous  (for  example  as  a
  613. consequence of overloading).
  614.  
  615. Raising an exception.  See exception.
  616.  
  617. Range.  A range is a contiguous set of values of a scalar type.  A range is
  618. specified by giving the lower and upper bounds for the values.  A value  in
  619. the range is said to belong to the range.
  620.  
  621. Range  constraint.   A  range  constraint  of a type specifies a range, and
  622. thereby determines the subset of the values of the type that belong to  the
  623. range.
  624.  
  625. Real  type.  A real type is a type whose values represent approximations to
  626. the real numbers.  There are two kinds of real type:  fixed point types are
  627. specified by absolute error bound;  floating point types are specified by a
  628. relative error bound expressed as a number of significant  decimal  digits.
  629.  
  630. Record  type.   A  value  of a record type consists of components which are
  631. usually of different types or subtypes.  For each  component  of  a  record
  632. value  or  record  object,  the  definition of the record type specifies an
  633. identifier that uniquely determines the component within the record.
  634.  
  635. Renaming declaration.  A renaming declaration declares another name for  an
  636. entity.
  637.  
  638. Rendezvous.   A  rendezvous  is  the  interaction  that  occurs between two
  639. parallel tasks when one task has called an entry of the other task,  and  a
  640. corresponding  accept  statement  is  being  executed  by the other task on
  641. behalf of the calling task.
  642.  
  643. Representation clause.  A representation clause directs the compiler in the
  644. selection of the mapping of a type, an object, or a task onto  features  of
  645. the   underlying   machine   that  executes  a  program.   In  some  cases,
  646. representation clauses completely specify the  mapping;   in  other  cases,
  647. they provide criteria for choosing a mapping.
  648.  
  649. Satisfy.  See constraint, subtype.
  650.  
  651. Scalar type.  An object or value of a scalar type does not have components.
  652. A  scalar  type  is either a discrete type or a real type.  The values of a
  653. scalar type are ordered.
  654.  
  655.  
  656.  
  657.                                    D - 9
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666. Scope.  See declaration.
  667.  
  668. Selected component.  A selected component is a name consisting of a  prefix
  669. and  of an identifier called the selector.  Selected components are used to
  670. denote record components, entries, and objects designated by access values;
  671. they are also used as expanded names.
  672.  
  673. Selector.  See selected component.
  674.  
  675. Simple name.  See declaration, name.
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.                                   D - 10
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732. Statement.  A statement specifies one  or  more  actions  to  be  performed
  733. during the execution of a program.
  734.  
  735. Subcomponent.   A  subcomponent  is  either  a component, or a component of
  736. another subcomponent.
  737.  
  738. Subprogram.  A subprogram is either a procedure or a function.  A procedure
  739. specifies a sequence  of  actions  and  is  invoked  by  a  procedure  call
  740. statement.   A  function specifies a sequence of actions and also returns a
  741. value called the result, and so  a  function  call  is  an  expression.   A
  742. subprogram  is  written  as  a  subprogram declaration, which specifies its
  743. name, formal parameters, and (for a function) its result;  and a subprogram
  744. body  which  specifies  the  sequence  of  actions.   The  subprogram  call
  745. specifies  the  actual parameters that are to be associated with the formal
  746. parameters.  A subprogram is one of the kinds of program unit.
  747.  
  748. Subtype.  A subtype of a type characterizes a subset of the values  of  the
  749. type.  The subset is determined by a constraint on the type.  Each value in
  750. the  set  of  values  of a subtype belongs to the subtype and satisfies the
  751. constraint determining the subtype.
  752.  
  753. Subunit.  See body.
  754.  
  755. Task.  A task operates in parallel with other parts of the program.  It  is
  756. written  as  a task specification (which specifies the name of the task and
  757. the names and formal parameters of its entries),  and  a  task  body  which
  758. defines its execution.  A task unit is one of the kinds of program unit.  A
  759. task  type  is a type that permits the subsequent declaration of any number
  760. of similar tasks of the type.  A value of a task type is said to  designate
  761. a task.
  762.  
  763. Type.   A  type characterizes both a set of values, and a set of operations
  764. applicable to those values.  A type definition is a language construct that
  765. defines a type.  A particular type is either an access type, an array type,
  766. a private type, a record type, a scalar type, or a task type.
  767.  
  768. Use clause.  A use clause achieves direct visibility of  declarations  that
  769. appear in the visible parts of named packages.
  770.  
  771. Variable.  See object.
  772.  
  773. Variant  part.   A  variant  part  of a record specifies alternative record
  774. components, depending on a discriminant of the record.  Each value  of  the
  775. discriminant establishes a particular alternative of the variant part.
  776.  
  777. Visibility.   At  a  given  point  in a program text, the declaration of an
  778. entity with a certain identifier is said to be visible if the entity is  an
  779. acceptable  meaning for an occurrence at that point of the identifier.  The
  780. declaration is visible by selection at the  place  of  the  selector  in  a
  781. selected  component  or  at  the  place of the name in a named association.
  782. Otherwise, the declaration is directly visible, that is, if the  identifier
  783. alone has that meaning.
  784.  
  785. Visible part.  See package.
  786.  
  787.  
  788.  
  789.                                   D - 11
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798. With clause.  See compilation unit.
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.                                   D - 12
  856.  
  857.  
  858.  
  859.  
  860.